package test2;

// 字符串转换
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        str = str.toLowerCase();
        List<Character> list = new ArrayList<>();
        StringBuilder sb = new StringBuilder();
        for (int i = 0 ; i < str.length() ; i++){
            int num = 0;
            if (list.size() == 0){
                list.add(str.charAt(i));
                sb.append(str.charAt(i));
                if (i == str.length() -1 ){
                    sb.append(1);
                }
            }else if (str.charAt(i) == list.get(0)){
                list.add(str.charAt(i));
                if (i == str.length()-1){
                    sb.append(list.size());
                }
            } else if (str.charAt(i) != list.get(0)){
                num = list.size();
                sb.append(num);
                for (int i1 = list.size() -1 ; i1 >= 0; i1--) {
                     list.remove(i1);
                }
                    i--;

            }
        }
        System.out.println(sb.toString());
    }

}
